package hua.mtreader.feature.personal.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.Button;

import hua.mtreader.R;
import hua.mtreader.base.BaseFragment;
import hua.mtreader.base.BaseFragmentPresenter;
import hua.mtreader.feature.login.activity.LoginActivity;

/**
 * Created by Administrator on 2017/3/14.
 */

public class PersonalFragment extends BaseFragment {


    private Button mBtnLogin;

    @Override
    public BaseFragmentPresenter createPresenter() {
        return null;
    }

    @Override
    public View initView() {
        View inflate = View.inflate(getContext(), R.layout.fragment_personal, null);
        mBtnLogin = (Button)inflate.findViewById(R.id.btn_login);
        return inflate;
    }

    @Override
    public void initData() {

    }

    @Override
    protected void setListener() {
        mBtnLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                goToLogin();
            }
        });
    }

    private void goToLogin() {
        startActivity(new Intent(mContext, LoginActivity.class));
    }


}
